<template>
  <el-breadcrumb separator="/">
    <el-breadcrumb-item v-for="(crumb, index) in breadcrumbs" :to="crumb.path">
      {{ crumb.title }}
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>
<script>
export default {
  name: 'Breadcrumbs',
  computed: {
    breadcrumbs() {
      return this.$route.matched.map(route => ({ title: route.name, path: route.path }));
    }
  }
};
</script>